<div class="center">
	<div class="home">
    	<div class="home_left">
        	<?php echo $this->partial('tuan/menu.phtml',array('uCount' => $this->uCount,'menuId'=>$this->menuId,'user'=>$this->user)); ?>
        </div>
    	<div class="home_right">
            <div class="waybill">
                <div class="waybillTop">
                  <h1>我的国际运单</h1>
                  <p>
                      <a href="/tuan/waybill/status/0">等待付款</a>
                      <a href="/tuan/waybill/status/1">等待受理</a>
                      <a href="/tuan/waybill/status/3">等待发货</a>
                      <a href="/tuan/waybill/status/2">已经发货</a>
                      <a href="/tuan/waybill/status/100">已完成</a>
                      <a href="/tuan/waybill/">全部</a>
                      
                  </p>
                </div>
                <div class="waybillTable">
                    <table>                                               
                        <tr>
                            <th class="w1">创建时间</th>
                            <th class="w2">流水号</th>
                            <th class="w3">运单信息</th>
                            <th class="w4">重量</th>
                            <th class="w5">运单状态</th>
                            <th class="w6">金额</th>
                        </tr>  
                        
                        
                    </table>
                    <div class="wuyd"<?php if(!empty($this->waybilllist))  echo "style='display:none'"; ?>   >
                    	<h2>您还没有发送过国际运单！</h2>
                        <p>猜您会：<a href="/member/mystore">去我的仓库发送运单</a><i>|</i><a href="/member/instore/">我要预报包裹</a><i>|</i><a href="/purchase/agent">我要代购</a></p>
                    </div>
                    <table>
                        <?php foreach ($this->waybilllist as  $item){ ?> 
                        <tr>
                            <td class="w1"><p><?php echo date('Y-m-d',strtotime($item->dateCreated));?><span><?php echo date('h:i:s',strtotime($item->dateCreated));?></span></p></td>
                            <td class="w2"><?php echo $item->billNo;?>
                                <a href="/tuan/waybill?userid=<?= $item->UserId ?>"><span style="color:red"> <?= $item->username() ?></span></a>
                                <p><?= $item->AgentBy?'['.$item->AgentBy->Name.']'.$item->AgentNo:'' ?></p>
                            </td>
                            <td class="w3">
                                <div class="WBinfo">
                                    <h2><?php echo $item->ExpressBy->Name; ?>/收件人:<?php echo $item->Consignee;?></h2>
                                    <p>物流编号：<?php  echo ($item->logistics!="")?$item->logistics:"[暂无]";?></p>
                                    <?= $item->cityBy->Name ?> <?php if($item->status>=0) echo '<a href="/tuan/waybillinfo/?id='.$item->id.'">运单详情&gt;&gt;</a>';  ?>
                                </div>
                            </td>
                            <td class="w4"><?php  echo $item->weight;?>&nbsp;g</td>
                            <td class="w5">
                                <span class="waystatus<?= $item->Status ?>"><?= $item->getStatusName() ?></span>
                            </td>
                            <td class="w6">
                                <?= $item->ShipMoney ?>元
                            </td>
                        </tr>         
                        <?php }?>
                    </table>
                </div>                
                <div class="toolbar" <?php if(empty($this->waybilllist))  echo "style='display: none'"; ?>>
                    <?php echo $this->partial('paging.phtml',array("pages"=>$this->waybills)); ?>
               </div>
            </div>
            
        </div>
    </div>
</div>